<?php


  class tableBox {
    var $table_border = '0';
    var $table_width = '';
    var $table_cellspacing = '0';
    var $table_cellpadding = '0';
    var $table_parameters = '';
    var $table_row_parameters = '';
    var $table_data_parameters = '';

// class constructor
    function tableBox($contents, $direct_output = false) 
	{
	
		if(tep_output_string($this->table_width)>0)
			  $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
			  
		else
			  $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
//*********************************************************************************	  
	  
      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
        $tableBox_string .= '  <tr';
        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
              $tableBox_string .= '    <td';
              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
              $tableBox_string .= '</td>' . "\n";
            }
          }
        } else {
          $tableBox_string .= '    <td';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
        }

        $tableBox_string .= '  </tr>' . "\n";
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;

      return $tableBox_string;
    }
  }
  // ------------------ infoBoxHeading ----------
  class infoBoxHeading extends tableBox {
    function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding = '0';
      $this->table_parameters = ' style="background:none;"';
     
      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => ' ',
                                         'text' => '
										 
            <table cellspacing="0" cellpadding="0" border="0">
             <tr>
              <td>
               <div style="margin-left:31px;" class="title1_txt">'.$contents[0]['text'].'<br>
               </div>
              </td>
             </tr>
            </table>
										 
				'));

      $this->tableBox($info_box_contents, true);
    }
  }  
  
  // ------------------ infoBox ----------
  class infoBox extends tableBox {
    function infoBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
      $this->table_cellpadding = '0';
      $this->table_parameters = 'style="margin-bottom:16px;"';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = ' style=" "';
      $info_box_contents = array();
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        $info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                           'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                           'params' => ' ',
                                           'text' => '
										   
										   
				<table cellspacing="0" cellpadding="0" border="0">
             <tr>
              <td>
               <div style="margin-left:35px; margin-top:15px; margin-bottom:18px;">
                '.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').'
               </div>
               <table cellspacing="0" cellpadding="0" border="0">
                <tr>
                 <td>
                  <div style="margin:0 22px 0 20px;">
                   <div class="line1">
						 '.tep_draw_separator('spacer.gif', '1', '1').'<br>
                   </div>
                  </div>
                 </td>
                </tr>
               </table>
              </td>
             </tr>
            </table>
				  									   
			'));
      }

      return $this->tableBox($info_box_contents);
    }
  }


  // ------------------ infoBox_X2 ----------
  class infoBox_X2 extends tableBox {
    function infoBox_X2($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
      $this->table_cellpadding = '0';
      $this->table_parameters = 'style="margin-bottom:16px;"';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = ' style=" "';
      $info_box_contents = array();
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        $info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                           'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                           'params' => ' ',
                                           'text' => '
										   
										   
				<table cellspacing="0" cellpadding="0" border="0">
             <tr>
              <td>
               <div style="margin-left:19px; margin-top:15px; margin-bottom:18px;">
                '.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').'
               </div>
               <table cellspacing="0" cellpadding="0" border="0">
                <tr>
                 <td>
                  <div style="margin:0 22px 0 20px;">
                   <div class="line1">
						 '.tep_draw_separator('spacer.gif', '1', '1').'<br>
                   </div>
                  </div>
                 </td>
                </tr>
               </table>
              </td>
             </tr>
            </table>
				  									   
			'));
      }

      return $this->tableBox($info_box_contents);
    }
  }




  // ------------------ infoBoxHeading1 ----------
  class infoBoxHeading1 extends tableBox {
    function infoBoxHeading1($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
      $this->table_cellpadding1 = '0';
      $this->table_parameters = '';
     
      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => '',
                                         'text' => '
													  
													  
				<table cellspacing="0" cellpadding="0" border="0" class="t_tt2">
                <tr>
                 <td><img src="images/tt2_left.gif" alt=""><br></td>
                 <td style="width:100%;" class="txt2 pos5 link3"><span>'.$contents[0]['text'].'</span><br>
                 </td>
                 <td><img src="images/tt2_right.gif" alt=""><br></td>
                </tr>
               </table>		 
										 
				
										 
			'));

      $this->tableBox($info_box_contents, true);
    }
  }  
  
  
  // ------------------ infoBox1 ----------
  class infoBox1 extends tableBox {
    function infoBox1($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
      $this->table_cellpadding = '0';
      $this->table_parameters = 'style="border-bottom:solid 6px #ffffff;"';
      $this->tableBox($info_box_contents, true);
    }

    function infoBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = ' style="background:#CBD316;"';
      $info_box_contents = array();
      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        $info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
                                           'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
                                           'params' => 'style="background:url(images/lbc1.gif) no-repeat left bottom;"',
                                           'text' => '
										   
<table cellspacing="0" cellpadding="0" border="0" style="background:url(images/rbc1.gif) no-repeat right bottom;">
                   <tr>
                    <td>
					<table cellspacing="0" cellpadding="0" border="0">
                      <tr>
                       <td class="pos4">
					   '.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').'
					   </td>
                      </tr>
                     </table></td>
                   </tr>
                  </table>
				  									   
			'));
      }

      return $this->tableBox($info_box_contents);
    }
  }



//----------------------------------------------- tableBox_output ----------------------------------
 class tableBox_output {
    var $table_border = '0';
    var $table_width = '';
    var $table_cellspacing = '0';
    var $table_cellpadding = '0';
    var $table_parameters = ' ';
    var $table_row_parameters = '';
    var $table_data_parameters = '';

// class constructor
    function tableBox_output($contents, $direct_output = false) {
	if(tep_output_string($this->table_width) >0)
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
	  
	  
	else
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '"  cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
	  
	  
	  
      if (tep_not_null($this->table_parameters)) $tableBox_string .= '' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
        
		 
		 if ($i != 0) { $tableBox_string .= '
					<tr>
						<td style="height:1px;" colspan="3" class="bg_gg">'.tep_draw_separator('spacer.gif', '1', '1').'</td>
					</tr>
					 ';} 
					  
		$tableBox_string .= '   <tr';
        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
			
                
				
				
				if ($x >= 1){
				
					if($i == 0) {$tableBox_string .= '<td style="width:1px;" class="bg_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>';}
					else		{ 
				
				
				
				  $tableBox_string .= '<td style="width:1px;" class="bg_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>';} 
											}

				 
			  $tableBox_string .= '    <td';
              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
              $tableBox_string .= '</td>  ' . "\n";
            }
          }
        } else {
          $tableBox_string .= '    <td';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
        }

        $tableBox_string .= '  </tr> 	' . "\n";
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;

      return $tableBox_string;
    }
  }
//---------------- tableBox_output --------------------- 
  class contentBox extends tableBox_output {
    function contentBox($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->contentBoxContents($contents));
      $this->table_cellpadding = '0';
      $this->table_parameters = ' ';
      $this->tableBox_output($info_box_contents, true);
    }

    function contentBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = 'class=""';
      return $this->tableBox_output($contents);
    }
  }
// ------------------ contentBoxHeading ---------------------------------------------------------
  class contentBoxHeading extends tableBox {
    function contentBoxHeading($contents) {
	
      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $info_box_contents = array();
      $info_box_contents[] = array( array('params' => '',
                                         'text' => '
													  
													  
				<table cellspacing="0" cellpadding="0" border="0">
                <tr>
                 <td>
				 '.tep_image(DIR_WS_IMAGES.'tt3_left').'<br></td>
                 <td style="width:100%;">
				 <table cellspacing="0" cellpadding="0" border="0" class="t_tt3">
                   <tr>
                    <td style="width:100%;" class="txt2 pos5">
					<span>'.tep_image(DIR_WS_IMAGES.'1_z3.gif').' '.$contents[0]['text'].'</span><br>
                    </td>
                   </tr>
                   <tr>
                    <td>
					'.tep_draw_separator('spacer.gif', '1', '1').'<br>
                    </td>
                   </tr>
                  </table>
				  </td>
                 <td>
				 '.tep_image(DIR_WS_IMAGES.'tt3_right').'<br>
				 </td>
                </tr>
               </table>											 
										 
										 '));

      $this->tableBox($info_box_contents, true);
    }
  }


//---------------- contentBoxHeading_WHATS_NEW --------------------- 
  class contentBoxHeading_WHATS_NEW extends tableBox {
    function contentBoxHeading_WHATS_NEW($contents) {

      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => ' class=""',
                                         'text' => '
						
				<table cellspacing="0" cellpadding="0" border="0"  style="background:#E7DFD8;">
             <tr>
              <td>
				  '.tep_image(DIR_WS_IMAGES.'tt_left_back.gif').'<br>
              </td>
              <td style="width:100%; background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '1', '5').'<br>
               <span class="title_txt">'.BOX_HEADING_WHATS_NEW.'</span><br>
              </td>
              <td>
				  '.tep_image(DIR_WS_IMAGES.'tt_right_back.gif').'<br>
              </td>
             </tr>
            </table>
						
										 
				'));

      $this->tableBox($info_box_contents, true);
    }
  }
//---------------- contentBoxHeading_WHATS_NEW_UNDER_SUBCATEGORY --------------------- 
  class contentBoxHeading_WHATS_NEW_UNDER_SUBCATEGORY extends tableBox {
    function contentBoxHeading_WHATS_NEW_UNDER_SUBCATEGORY($contents) {

      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => ' class=""',
                                         'text' => '
						
				<table cellspacing="0" cellpadding="0" border="0"  style="background:#E7DFD8;">
             <tr>
              <td style="width:100%; background:#E7DFD8;">
               <div class="title_txt" style="margin:25px 0 25px 25px;">'.BOX_HEADING_WHATS_NEW.'</div><br>
              </td>
             </tr>
            </table>
						
										 
				'));

      $this->tableBox($info_box_contents, true);
    }
  }
//---------------- contentBoxHeading_ProdNew --------------------- 
  class contentBoxHeading_ProdNew extends tableBox {
    function contentBoxHeading_ProdNew($contents) {

      $this->table_cellpadding = '0';
      $this->table_parameters = '';
      $info_box_contents = array();
      $info_box_contents[] = array(array('params' => ' class=" "',
                                         'text' => '
													  
			
				<table cellspacing="0" cellpadding="0" border="0">
             <tr>
              <td>
				  '.tep_image(DIR_WS_IMAGES.'tt_left_back.gif').'<br>
              </td>
              <td style="width:100%; background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '1', '5').'<br>
               <span class="title_txt">'.HEADING_TITLE.'</span><br>
              </td>
              <td>
				  '.tep_image(DIR_WS_IMAGES.'tt_right_back.gif').'<br>
              </td>
             </tr>
            </table>

										 
				'));

      $this->tableBox($info_box_contents, true);
    }
  }

  class errorBox extends tableBox {
    function errorBox($contents) {
      $this->table_data_parameters = 'class="errorBox"';
      $this->tableBox($contents, true);
    }
  }


//---------------- tableBox_shopping_cart --------------------- 
class tableBox_shopping_cart {
    var $table_border = '0';
    var $table_width = '';
    var $table_cellspacing = '0';
    var $table_cellpadding = '0';
    var $table_parameters = '';
    var $table_row_parameters = '';
    var $table_data_parameters = '';

// class constructor
    function tableBox_shopping_cart($contents, $direct_output = false) {
	
	
	if(tep_output_string($this->table_width)>0)
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
	  
	  
	else
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '"  cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
	  
	  
	  
	  
      if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
		 
		  
		  if($i == 0)
		  
		  {
		  	
			echo ('
			
			<table cellspacing="0" cellpadding="0" border="0" style="background:url(images/ltc1.gif) no-repeat left top #F2F2F2;">
                            <tr>
                             <td style="background:url(images/lbc1.gif) no-repeat left bottom;">
                              <table cellspacing="0" cellpadding="0" border="0" style="background:url(images/rtc1.gif) no-repeat right top; height:35px;">
                               <tr>
                                <td style="background:url(images/rbc1.gif) no-repeat right bottom; padding:0 0 0 21px; vertical-align:middle;">
                                 <table cellspacing="0" cellpadding="0" border="0">
                                  <tr>
                                   <td width="65" class="title2_txt" style="text-align:center;">'.TABLE_HEADING_REMOVE.'<br>
                                   </td>
                                   <td width="220" class="title2_txt" style="text-align:center;">'.TABLE_HEADING_PRODUCTS.'<br>
                                   </td>
                                   <td width="140" class="title2_txt" style="text-align:center;">'.TABLE_HEADING_QUANTITY.'<br>
                                   </td>
                                   <td class="title2_txt" style="text-align:left;">'.TABLE_HEADING_TOTAL.'<br>
                                   </td>
                                  </tr>
                                 </table>
                                </td>
                               </tr>
                              </table>
                             </td>
                            </tr>
                           </table>
			
			
			
			
			
			');
				
			
			
			
		  }
		  
		  
       if ($i > 1) { $tableBox_string .= '
	   

						<tr><td  class="cart_line" colspan="4">'.tep_draw_separator('spacer.gif', '1', '1').'</td></tr>							  
							  ';}
	   
	    $tableBox_string .= ' <tr';
		
        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
              if ($x >= 1) $tableBox_string .= '';
			  
 			  $tableBox_string .= '     <td';
              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
			  
			    if ($i == 0)  $tableBox_string .= tep_draw_shop_top();
				else $tableBox_string .= tep_draw_shop_top();
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
			  if ($i == 0)  $tableBox_string .= tep_draw_shop_bottom();
			  else $tableBox_string .= tep_draw_shop_bottom();
			  
              $tableBox_string .= '</td>' . "\n";
            }
          }
        } else {
          $tableBox_string .= '    <td';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>'.tep_draw_shop_top_1() . $contents[$i]['text'] . tep_draw_shop_bottom_1().'</td>' . "\n";
        }

        $tableBox_string .= '  </tr>' . "\n";
		
/*  if ($i >= 2) {  */
 $tableBox_string .= '
										 
 ';
 /*  }  */		
		
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;

      return $tableBox_string;
    }
  }
  class productListingBox extends tableBox_shopping_cart {
    function productListingBox($contents) {
      $this->table_parameters = ' class="box_width_cont product"';
      $this->tableBox_shopping_cart($contents, true);
    }
  }
  
// -------------------------------------- --------------------------  
$tep_draw_heading_top_prod_type1='
                  <table cellspacing="0" cellpadding="0" border="0" style="background:url(images/ltc.gif) no-repeat left top #ffffff;">
                   <tr>
                    <td style="background:url(images/lbc.gif) no-repeat left bottom;">
                     <table cellspacing="0" cellpadding="0" border="0" style="background:url(images/rtc.gif) no-repeat right top;">
                      <tr>
                       <td style="background:url(images/rbc.gif) no-repeat right bottom;">
                        <table cellspacing="0" cellpadding="0" border="0">
                         <tr>
                          <td style="width:5px;">
								   '.tep_draw_separator('spacer.gif', '5', '1').'<br>
                          </td>
                          <td style="width:100%; ">
			  
  
  ';
  
// -------------------------------------- --------------------------  
$tep_draw_heading_bottom_prod_type1='
									</td>
                          <td style="width:6px;">
								   '.tep_draw_separator('spacer.gif', '6', '1').'<br>
                          </td>
                         </tr>
                        </table>
                       </td>
                      </tr>
                     </table>
                    </td>
                   </tr>
                  </table>

';

// -------------------------------------- --------------------------
// -------------------------------------- --------------------------  
  function tep_draw_heading_top()
  {
 			/*  require(DIR_WS_BOXES . 'panel_top.php');  */ 
  echo '
  
        <table cellspacing="0" cellpadding="0" border="0">
       <tr>
        <td>
		  '.tep_draw_separator('spacer.gif', '9', '1').'<br>
        </td>
        <td style="width:100%;">
         <table cellspacing="0" cellpadding="0" border="0">
          <tr>
           <td>
			  
  
  ';
  }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom()
{

echo '

           </td>
          </tr>
         </table>
        </td>
        <td> '.tep_draw_separator('spacer.gif', '6', '1').'<br>
        </td>
       </tr>
      </table>


';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------  
  function tep_draw_heading_top_1()
  {
  
  
  echo '
  
  
<table cellspacing="0" cellpadding="0" border="0">
             <tr>
              <td style="background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '14', '1').'<br>
              </td>
              <td style="width:100%;">';
				  
				 
				  
  }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom_1()
{

echo ' 
								
				  </td>
              <td style="background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '14', '1').'<br>
              </td>
             </tr>
             <tr>
              <td>
				  	'.tep_image(DIR_WS_IMAGES.'lbc_obv.gif').'<br>
              </td>
              <td style="width:100%; background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '1', '1').'<br>
              </td>
              <td>
				  	'.tep_image(DIR_WS_IMAGES.'rbc_obv.gif').'<br>
              </td>
             </tr>
            </table>					
						
';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------  
  function tep_draw_heading_top_1_for_subcategory()
  {
  echo '
  
  
<table cellspacing="0" cellpadding="0" border="0">
             <tr>
              <td style="background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '14', '1').'<br>
              </td>
              <td style="width:100%;">';
				  

				  
  }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom_1_for_subcategory()
{

echo ' 
								
				  </td>
              <td style="background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '14', '1').'<br>
              </td>
             </tr>
            </table>					
						
';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------   
  function tep_draw_heading_top_2()
  {
 			
  echo '
  
  <table cellspacing="0" cellpadding="0" border="0">
                <tr>
                 <td style="width:100%;">
                  <table cellspacing="0" cellpadding="0" border="0" style="background:url(images/ltc.gif) no-repeat left top #ffffff;">
                   <tr>
                    <td style="background:url(images/lbc.gif) no-repeat left bottom;">
                     <table cellspacing="0" cellpadding="0" border="0" style="background:url(images/rtc.gif) no-repeat right top;">
                      <tr>
                       <td style="background:url(images/rbc.gif) no-repeat right bottom;">
                        <table cellspacing="0" cellpadding="0" border="0">
                         <tr>
                          <td>'.tep_draw_separator('spacer.gif', '10', '1').'<br>
                          </td>
                          <td style="width:100%;"> '.tep_draw_separator('spacer.gif', '1', '6').'<br>
                           <table cellspacing="0" cellpadding="0" border="0" style="background:url(images/ltc1.gif) no-repeat left top #F2F2F2;">
                            <tr>
                             <td style="background:url(images/lbc1.gif) no-repeat left bottom;">
									  

  
  

 ';
  }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom_2()
{

echo '
	
	                           
                             </td>
                            </tr>
                           </table>
                          </td>
                          <td> '.tep_draw_separator('spacer.gif', '10', '1').'<br>
                          </td>
                         </tr>
                        </table>
                       </td>
                      </tr>
                     </table>
                    </td>
                   </tr>
                  </table>
                 </td>
                </tr>
               </table>



';
} 
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------  
  function tep_draw_heading_top_3()
  {
  echo '
            <table cellspacing="0" cellpadding="0" border="0">
             <tr>
              <td style="background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '14', '1').'<br>
              </td>
              <td style="width:100%;background:#E7DFD8;">
  ';
 			
  }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom_3()
{

echo ' 
								
				  </td>
              <td style="background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '14', '1').'<br>
              </td>
             </tr>
             <tr>
              <td>
				  	'.tep_image(DIR_WS_IMAGES.'lbc_obv.gif').'<br>
              </td>
              <td style="width:100%; background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '1', '1').'<br>
              </td>
              <td>
				  	'.tep_image(DIR_WS_IMAGES.'rbc_obv.gif').'<br>
              </td>
             </tr>
            </table>						
';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------  
  function tep_draw_titletop()
  {
  echo '
				<table cellspacing="0" cellpadding="0" border="0" style="background:#E7DFD8;">
             <tr>
              <td>
				  '.tep_image(DIR_WS_IMAGES.'tt_left_back.gif').'<br>
              </td>
              <td style="width:100%; background:#E7DFD8;">
				  '.tep_draw_separator('spacer.gif', '1', '5').'<br>
               <span class="title_txt">
  ';
 			
  }
// -------------------------------------- --------------------------  
function tep_draw_titlebottom()
{

echo ' 
								
			</span><br>
			<br style="line-height:5px;">
              </td>
              <td>
				  '.tep_image(DIR_WS_IMAGES.'tt_right_back.gif').'<br>
              </td>
             </tr>
            </table>

						
';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------
  function  tep_draw_prod_top()
  {
  return $table = '';
  }
// -------------------------------------- --------------------------
  function  tep_draw_prod_bottom()
  {
   return $table =  '';
  }
  // -------------------------------------- --------------------------
  function  tep_draw_shop_top()
  {
  return $table = '';
  }
// -------------------------------------- --------------------------
  function  tep_draw_shop_bottom()
  {
   return $table =  '';
  }
  // -------------------------------------- --------------------------
  function  tep_draw_shop_top_1()
  {
  return $table = '';
  }
// -------------------------------------- --------------------------
  function  tep_draw_shop_bottom_1()
  {
   return $table =  '';
  }
// -------------------------------------- --------------------------  
  function tep_draw_result_top()
  {
  echo '
  <table cellpadding="0" cellspacing="0" border="0"><tr><td style="height:1px; ">'.tep_draw_separator('spacer.gif', '1', '1').'</td></tr></table>
  ';
  }
// -------------------------------------- --------------------------  
function tep_draw_result_bottom()
	{
	echo '
  <table cellpadding="0" cellspacing="0" border="0"><tr><td style="height:1px;">'.tep_draw_separator('spacer.gif', '1', '1').'</td></tr></table>	';
	}
// -------------------------------------- --------------------------  
function tep_draw_separate()
	{
	echo '
			<table cellpadding="0" cellspacing="0"><tr><td height="1"></td></tr></table>
	';
	}
// -------------------------------------- --------------------------  
  	// ------------------ infoBox_77 ----------
	class infoBox_77 extends tableBox {
	function infoBox_77($contents) {
	  $info_box_contents = array();
	  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
	  $this->table_cellpadding = '0';
	  $this->table_parameters = 'class=""';
	  $this->tableBox($info_box_contents, true);
	}
	
	function infoBoxContents($contents) {
	  $this->table_cellpadding = '0';
	  $this->table_parameters = ' class=""';
	  $info_box_contents = array();
	  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		$info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										   'params' => '',
										   'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
	  }
	
	  return $this->tableBox($info_box_contents);
	}
	}
	// ------------------ infoBox_78 ----------
	class infoBox_78 extends tableBox {
	function infoBox_78($contents) {
	  $info_box_contents = array();
	  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
	  $this->table_cellpadding = '0';
	  $this->table_cellspacing = '1';
	  $this->table_parameters = 'class="infoBox"';
	  $this->tableBox($info_box_contents, true);
	}
	
	function infoBoxContents($contents) {
	  $this->table_cellpadding = '0';
	   $this->table_cellspacing = '15';
	  $this->table_parameters = 'class="infoBoxContents "';
	  $info_box_contents = array();
	  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
		$info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
										   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
										   'params' => ' class="main"',
										   'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
	  }
	
	  return $this->tableBox($info_box_contents);
	}
	}
	
  //----------------------------------------------- tableBox_output1 ----------------------------------
 class tableBox_output1 {
    var $table_border = '0';
    var $table_width = '';
    var $table_cellspacing = '0';
    var $table_cellpadding = '0';
    var $table_parameters = ' ';
    var $table_row_parameters = '';
    var $table_data_parameters = '';

// class constructor
    function tableBox_output1($contents, $direct_output = false) 
	{
		if(tep_output_string($this->table_width)>0)
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
	  
	  
		else
      $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
	  
	 //********************************************************************* 
	  
	  
      if (tep_not_null($this->table_parameters)) $tableBox_string .= '' . $this->table_parameters;
      $tableBox_string .= '>' . "\n";

      for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
        
		 
		 if ($i != 0) { $tableBox_string .= '
		
					<tr><td colspan="3" class="bg_gg">'.tep_draw_separator('spacer.gif', '1', '1').'</td></tr>			 
					 ';} 
					  
		$tableBox_string .= '   <tr';
        if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
        if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
        $tableBox_string .= '>' . "\n";

        if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
          for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
            if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
			
                
				
				
				if ($x >= 1){
				
					if($i == 0) {$tableBox_string .= '
											<td class="bg_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>
											';}
					else		{ 
				
				
				
				  $tableBox_string .= '
											<td class="bg_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>
											';} 
											}
				 
			  $tableBox_string .= '    <td';
              if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
              if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
                $tableBox_string .= ' ' . $contents[$i][$x]['params'];
              } elseif (tep_not_null($this->table_data_parameters)) {
                $tableBox_string .= ' ' . $this->table_data_parameters;
              }
              $tableBox_string .= '>';
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
              $tableBox_string .= $contents[$i][$x]['text'];
              if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
              $tableBox_string .= '</td>  ' . "\n";
            }
          }
        } else {
          $tableBox_string .= '    <td';
          if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
          if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
            $tableBox_string .= ' ' . $contents[$i]['params'];
          } elseif (tep_not_null($this->table_data_parameters)) {
            $tableBox_string .= ' ' . $this->table_data_parameters;
          }
          $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
        }

        $tableBox_string .= '  </tr> 	' . "\n";
        if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
      }

      $tableBox_string .= '</table>' . "\n";

      if ($direct_output == true) echo $tableBox_string;

      return $tableBox_string;
    }
  }
//---------------- tableBox_output1 --------------------- 
  class contentBox1 extends tableBox_output1 {
    function contentBox1($contents) {
      $info_box_contents = array();
      $info_box_contents[] = array('text' => $this->contentBoxContents($contents));
      $this->table_cellpadding = '0';
      $this->table_parameters = ' class="box_width_cont product"';
      $this->tableBox_output1($info_box_contents, true);
    }

    function contentBoxContents($contents) {
      $this->table_cellpadding = '0';
      $this->table_parameters = 'class=""';
      return $this->tableBox_output1($contents);
    }
  }	?>
